<%= javascript_include_tag "sharing.js" -%>

        <h2>Create a new dataset by uploading a CSV/tabbed dataset file which has the column/variable names.  Once it has loaded you can add metadata for the columns/variables.</h2><br/>

<h1>New Dataset</h1>

<div class="show_basic">
  <% form_tag({:action => :create}, :multipart => true) do -%>
    <%= error_messages_for :dataset -%>
<%= hidden_field_tag "dataset[survey]", @survey.id -%>
    <center>
      <div style="width: 60%;">

        <p>
          <b>File to upload:&nbsp;</b>
          <%= file_field :dataset, :data -%>
        </p>
		<p>
			<b>Format</b>
					<%= select_tag 'dataset_format' ,options_for_select(dataset_format_options) -%>
					</p>
<!-- Survey type will be automatically inserted since this page will only be available from the parent survey page -->


        <p style="margin-top: 1.5em;">
          <b>Title:</b> (Enter dataset title here)<br/>
          <%= text_field_tag 'dataset[title]', '', :style => "width: 100%;" -%>
        </p>

        <p style="margin-top: 0.5em;">
          <b>Description:</b> (Enter a description of the dataset here)<br/>
          <%= text_area_tag 'dataset[description]', '', :style => "width: 100%;", :rows => 5 -%>
        </p>

      </div>
    </center>

    <p style="text-align: center; margin-top: 1.5em;">
      <%= submit_tag "Upload and Save", :id => "dataset_submit_btn", :onclick => "javascript: validateDatasetFields(true); return(false);" -%> or <%= link_to 'Cancel', survey_path(@survey) -%>
    </p>
  <% end -%>
</div>
